#include<stdio.h>
#include<conio.h>
int main()
{
int a[10],i,n,b[10],j=0;
printf("<<< ARRAY >>>\n");
for(i=0;i<10;i++)
{
printf("Number %d : ",i+1);
scanf("%d",&a[i]);
}
printf("<<< SEARCH >>>\n");
printf("Enter the number to look for in the array : ");
scanf("%d",&n);
for(i=0;i<10;i++)
{
if(a[i]==n)
{
b[j]=i;
j++;
}
}
if(j>0)
{
printf("The number %d is present at the ",n);
if(j==1)
printf("position ");
else
printf("positions ");
for(i=0;i<j;i++)
printf("%d ",b[i]);
printf("of the array");
}
else
{
printf("The number %d is not present in the array!",n);
}
getch();
return 0;
}